<?php /* Smarty version Smarty-3.1.12, created on 2013-06-03 22:49:12
         compiled from "D:\redwazi2\sys-admin\template\auth\role_list.htm" */ ?>
<?php /*%%SmartyHeaderCode:2314951acace86bb6a9-68840370%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '59b948f3a7a0669253f9bd7b2304f882a1e11983' => 
    array (
      0 => 'D:\\redwazi2\\sys-admin\\template\\auth\\role_list.htm',
      1 => 1364821948,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2314951acace86bb6a9-68840370',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'roles' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_51acace8749c81_51986785',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51acace8749c81_51986785')) {function content_51acace8749c81_51986785($_smarty_tpl) {?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Yooes管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/sys-admin/css/general.css" rel="stylesheet" type="text/css">
<link href="/sys-admin/css/main.css" rel="stylesheet" type="text/css">
<script src="/sys-admin/js/jquery.js" type="text/javascript"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="/sys-admin/action/auth/role.php?met=addui">添加角色</a></span>
<span id="search_id" class="action-span1">角色管理</span>
</h1>
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th class="num">#</th>
    <th>用户名</th>
    <th>排序</th>
    <th>操作</th>
  </tr>
  <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['role'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['role']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['name'] = 'role';
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['roles']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['role']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['role']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['role']['total']);
?> 
	  <tr class="share">
	  	<td class="num"><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['role']['index']+1;?>
</td>  
	    <td><?php echo $_smarty_tpl->tpl_vars['roles']->value[$_smarty_tpl->getVariable('smarty')->value['section']['role']['index']]['role_name'];?>
</td>  
	    <td><?php echo $_smarty_tpl->tpl_vars['roles']->value[$_smarty_tpl->getVariable('smarty')->value['section']['role']['index']]['sort_order'];?>
</td> 
	    <td> 
		<a href="/sys-admin/action/auth/role.php?met=editui&rid=<?php echo $_smarty_tpl->tpl_vars['roles']->value[$_smarty_tpl->getVariable('smarty')->value['section']['role']['index']]['role_id'];?>
" class="oper_edit" title="编辑"></a>
		<a href="javascript:delRole(<?php echo $_smarty_tpl->tpl_vars['roles']->value[$_smarty_tpl->getVariable('smarty')->value['section']['role']['index']]['role_id'];?>
,'<?php echo $_smarty_tpl->tpl_vars['roles']->value[$_smarty_tpl->getVariable('smarty')->value['section']['role']['index']]['role_name'];?>
');" class="oper_trash" title="删除"></a>
	    </td>
	</tr>
   <?php endfor; endif; ?>
</table>
</div>
<script type="text/javascript">
function delRole(roleId,rname){
	if(confirm("您确定要删除'"+rname+"'?")){
		$.get('/sys-admin/action/auth/role.php?met=delete&rid='+roleId+'&t='+(new Date().getTime()),null,function(result){
			if($.trim(result) == "1"){
				alert("删除'"+rname+"'成功");
				document.location.reload();
			}else{
				alert("删除'"+rname+"'失败");
				document.location.reload();
			}
		});
	}
}
</script>
</body></html><?php }} ?>